/* ************************************************************************



************************************************************************ */

qx.Class.define("HersPOS.ItemTableComp",
{
  //   extend : qx.ui.window.Composite,
  extend : qx.ui.container.Composite,

  events :
  {
    "reload"        : "qx.event.type.Event",
    "reload_selbox" : "qx.event.type.Event"
  },

  construct : function()
  {
    this.base(arguments);
    var layout = new qx.ui.layout.VBox();
    this.setLayout(layout);

    //   this.setLayout(new qx.ui.layout.Grid())
    this.setBackgroundColor("background-splitpane");

    this.setDecorator("main");
    this.setPadding(0);
    layout.setSeparator("separator-vertical");

    //   this.setWidth(Math.floor(qx.bom.Viewport.getWidth() * 0.12));
    this.ItemTable = new HersPOS.ItemTable();
    this.ItemBar = new HersPOS.ItemBar();

    this.add(this.ItemTable, { flex : 1 });
    this.add(this.ItemBar, { flex : 0 });

    this.ItemBar.addListener("reload", function()
    {
      this.ItemTable.reload_model();
//       this.ItemTable.scrollCellVisible();
      this.fireEvent("reload_selbox");
    },
    this);
  }
});

//     this.botPart.exclude()